<template>
	<view>
		<view class="interview">
			<view @click="gotoDetail(item)" class="interview-item" v-for="item in interviewList">
				<view class="lf">
					<image :src="item.img" mode="widthFix"></image>
				</view>
				<view class="rg">
					<view class="comname">{{ item.comname }}</view>
					<view class="title">{{ item.title }}</view>
					<view class="time">{{ item.time | date('yyyy-mm-dd hh:MM:ss') }}</view>
					<button @click.stop="" size="default" type="default" class="btn" hover-class="is-hover" hover-stay-time="100">面试</button>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			textColor:'#ffffff',
			interviewList: [
				{
					id: 1,
					img: '/static/page1.jpg',
					comname: '广州无限大科技有限公司',
					title: '1JAVA开发工程师',
					time: Date.now()
				},
				{
					id: 2,
					img: '/static/page1.jpg',
					comname: '广州无限大科技有限公司',
					title: '2JAVA开发工程师',
					time: Date.now()
				},
				{
					id: 3,
					img: '/static/page1.jpg',
					comname: '广州无限大科技有限公司',
					title: '3JAVA开发工程师',
					time: Date.now()
				}
			]
		};
	},
	methods: {
		// 跳转去岗位详情
			gotoDetail(item) {
				// 统一设置收藏为false
				item.collectState=false
				uni.navigateTo({
					// url要传id参数
					// 加密url参数对象
					url: '/subpkg/recruit/recruitDetail?item='+encodeURIComponent(JSON.stringify(item))
				});
			}
		
	}
};
</script>

<style lang="scss" scoped>
.interview {
	padding-top:40rpx  ;
	.interview-item {
		display: flex;
		margin: 0 30rpx 40rpx;
		box-shadow: 0 0 12rpx #ccc;
		border-radius: 12rpx;
		overflow: hidden;
		.lf {
			width: 200rpx;
			height: 200rpx;
			overflow: hidden;
		}
		.rg {
			position: relative;
			display: flex;
			flex-direction: column;
			justify-content: space-around;
			margin-left: 20rpx;
			font-size: 32rpx;
			.title {
				font-weight: 700;
			}
			.btn {
				width: 120rpx;
				height: 65rpx;
				line-height: 65rpx;
				position: absolute;
				right: -90rpx;
				top: 68rpx;
				background-color: grey;
				color: white;
				border-radius: 12rpx;
				font-size: 30rpx;
			}
			.is-hover {
				background-color: #00dcb6;
			}
		}
	}
}
</style>
